import QtQuick 2.2

Image {
    id: container
    width: 84
    height: 84
    property int fsize : 20
    property string text0: ""
    property string text: ""
    property string source0: ""
    property string source1: ""
    property bool pressen:true
    signal btclicked(string str)

    source: source0
    MouseArea {
        id: mouseArea
        anchors.fill: parent

        onPressed:{
            if(pressen)
            source=source1
        }
         onReleased: {
             if(pressen)
             {
                container.btclicked(container.text);
                source=source0
             }
         }
    }

    Text {
        id: buttonLabel
        font.pixelSize: fsize
        font.family: "WenQuanYi Micro Hei Mono"
        anchors.centerIn: container
        text: container.text0
    }
}
